package Chapter2.Comparing.c4;

public class Practive {
    public static void main(String[] args) {
        String str = "我我...我...我我...我喜....喜喜喜....喜喜...喜欢欢..欢欢..欢...欢亮亮亮...亮...亮哥";
        str = str.replaceAll("\\.+","");
        System.out.println(str);
        /*str=str.replaceAll("\\.+","");
        System.out.println(str);*/

        str=str.replaceAll("(.)\\1+","$1");
        System.out.println(str);
    }
}
